<?php //pack11class

header("Content-type: image/jpeg");

class PhotoZoomer extends Module {

    public function setup() {
        $image=ImageResizer::getImage($_GET["photo"], $_GET["w"], $_GET["h"]);

        $width=$image["w"];
        $height=$image["h"];

        $bordercolors = imagecolorallocate($image["image"], 0, 0, 0);

        imageline($image["image"], 0,0,$width-1,0,$bordercolors); //left
	imageline($image["image"], $width-1,0,$width-1,$height-1,$bordercolors); //top
	imageline($image["image"], $width-1,$height-1,0,$height-1,$bordercolors); //right
	imageline($image["image"], 0,$height-1,0,0,$bordercolors);

        imagejpeg($image["image"], NULL, 100);
        imagedestroy($image["image"]);
    }

}
?>
